import { defineStore } from "pinia"

const mainStore = defineStore("coachStore", {
    state(){
        return {
            coachList:[],//教练列表

        }
    },
    persist: {
        enabled: true, // 开启持久化保存
    },
    actions: {
        setCoachList(coachList:Array<any>){
            // console.log(123);
            
            // console.log("store数据",coachList);
            this.coachList = coachList
            //  console.log("数据存储", this.coachList);
        },
        // setVipCardLevelById(vipCardLevelById:Array<any>){
        //     this.vipCardLevelById = vipCardLevelById
        //     //  console.log("数据存储", this.vipCardLevelById);
        // },
        // setIntegralRuleById(integralRuleById:Array<any>){
        //     this.integralRuleById = integralRuleById
        //     // console.log("数据存储", this.integralRuleById);
        // }
    },
    getters: {
        getCoachList():Array<any>{
            return this.coachList
        },
        // getVipCardLevelById():Array<any>{
        //     console.log(123);
            
        //     console.log("会员卡等级数据", this.vipCardLevelById);
        //     return this.vipCardLevelById
        // },
        // getIntegralRuleById():Array<any>{
        //     // console.log(this.SearchVipCardListByIdList);
        //     return this.integralRuleById
        // }
    }
})


export default mainStore;